
import React, { Component } from 'react'
import pubSub from "../../../utils/myPubSub";


export default class SonA extends Component {

  chuan=()=>{
    console.log("chuan");
    pubSub.publish("onclick","hello,兄弟");
  }

  render() {
    return (
      <>
        <div>SonA</div>
        <input type="button" value="传给兄弟" onClick={this.chuan} />
      </>
    )
  }
}
